<div class="container-fluid fontcss">
    <div class="panel panel-warning">
        <!-- header -->
        <div class="panel-heading ">
            <h1 style="color:#ff6600;" align="center">
                {{ obj.article.title }}
            </h1>

            <div align="center">
                <font color="black" size="4">
                    作者：
                    <a href="/account/user/{{ obj.article.author.id }}/">
                        {{ obj.article.author.nickname }}
                    </a>
                </font>
                &nbsp&nbsp&nbsp
                <span class="glyphicon glyphicon-tags" aria-hidden="true"></span>
                :
                <a href="">
                    {{ obj.article.tags }}
                </a>
            </div>
        </div>
        <!-- header end-->
        <!-- main content -->
        <div class="panel-body">

            <hr>
            <div role="article" id="maincontent_html" >
                {{obj.article.content|safe}}
            </div>
            <hr>
        </div>

        <!-- main content end-->
        <!-- assess -->
        <script type="text/javascript">
            function toRemark() { // 评论
                $("#comment_textarea").focus();
            }
        </script>

        <div align="center">
            评论
            <a href="javascript:void(0)" onclick="toRemark()">
                <i class="am-icon-comments"></i>
                ({{ obj.commentList.count }})
            </a>
            &nbsp; 浏览
            <span >
                <i class="am-icon-eye"></i>
                ({{ obj.article.allScanCount }})
            </span>
            &nbsp; 赞
            <i class="am-icon-heart"></i>
            <a id="span_praise" onclick="toPraise()">
                ({{ obj.praiseCount }})
                <script type="text/javascript">
                    function toPraise() { //点赞或者消赞

                        $.ajax({
                            type: 'GET',
                            url: '/forum/sharing/{{ obj.article.id }}/praise/addition/',

                            data: {},
                            success: function (data) {
                                $("#span_praise").html("(" + data + ")");
                            },
                            error: function () {
                                alert("点赞失败T_T!");
                            },
                            dataType: 'html'
                        });
                    }
                </script>
            </a>
            &nbsp 收藏
            <i class="am-icon-folder"></i>
            <a id="a_collection" onclick="toCollection()">
                ({{ obj.collectionCount}})
                <script>
                    function toCollection() { //收藏
                        $.ajax({
                            type: 'GET',
                            url: '/forum/sharing/{{ obj.article.id }}/collection/addition/',
                            data: {},
                            success: function (data) {
                                $("#a_collection").empty();
                                $("#a_collection").html("(" + data + ")");
                                return
                            },
                            error: function () {
                                alert("收藏失败T_T!");
                                return
                            },
                            dataType: 'html'
                        });
                    }
                </script>
            </a>
            <!-- &nbsp 举报
            <a href="">
              <i class="am-icon-flag">
              </i>
              (0)
            </a>
            &nbsp-->
        </div>


        <!-- assess -->


        <!-- comment list -->
        {% include 'forum/comment.html' %}
        <!-- comment list end -->
        <br>
        {% include 'forum/yourcomment.html' %}


    </div>

</div>
